package com.javalong.affairs.module.renwujinzhang.activity;

import android.view.Menu;
import android.view.MenuItem;

import com.javalong.affairs.R;
import com.javalong.affairs.base.activity.ToolbarActivity;
import com.javalong.affairs.module.main.activity.NewMainActivity;
import com.javalong.affairs.module.renwujinzhang.activity.audit.AuditListActivity;
import com.javalong.affairs.module.renwujinzhang.activity.complete.CompleteListActivity;
import com.javalong.affairs.module.renwujinzhang.activity.disagree.DisagreeListActivity;
import com.javalong.affairs.module.renwujinzhang.activity.praise.PraiseListActivity;
import com.javalong.affairs.module.renwujinzhang.activity.receive.ReceiveListActivity;
import com.javalong.affairs.module.renwujinzhang.activity.supervise.SuperviseListActivity;
import com.javalong.affairs.module.task.activity.TaskTrackActivity;

/**
 * Created by javalong on 2016/5/22.
 */
public class TaskActivity extends ToolbarActivity {
    @Override
    protected void initLayout() {
    }

    @Override
    protected void initData() {

    }

    @Override
    public boolean onCreateOptionsMenu(Menu menu) {
        getMenuInflater().inflate(R.menu.menu_tracktasklist, menu);
        return true;
    }

    @Override
    public boolean onOptionsItemSelected(MenuItem item) {
        switch (item.getItemId()) {
            case R.id.action_new:
                NewTaskActivity.toThisActivity(this);
                break;
            case R.id.action_send:
                TrackTaskActivity.toThisActivity(this);
                break;
            case R.id.action_audit:
                AuditListActivity.toThisActivity(this);
                break;
            case R.id.action_supervise:
                SuperviseListActivity.toThisActivity(this);
                break;
            case R.id.action_praise:
                PraiseListActivity.toThisActivity(this);
                break;
            case R.id.action_complete:
                CompleteListActivity.toThisActivity(this);
                break;
        }
        return true;
    }

    @Override
    public void onBackPressed() {
        NewMainActivity.toThisActivity(this);
    }
}
